@import "mixins";

#wrapper {
    width: 100%;

    /* header start */
    #header {
        .size(100%, 105px);
        .bg(url('../images/headerbg.png') repeat-x);

        .inner {
            .size(990px, 105px);
            .center(auto-x);
            position: relative;

            /* logo ----- */

            #logo {
                .size(158px, 59px);
                margin-left: 20px;

                a {
                    display: block;
                }
            }

            /* search */

            #search {
                .size(214px, 27px);
                position: absolute;
                top: 20px;
                left: 198px;

                input {
                    .size(100%, 100%);
                    .color(#999999);
                    .fz(14px);
                    border: 1px solid #BABEBF;
                    padding-left: 8px;
                    box-sizing: border-box;
                }
            }

            /* theme ----- */

            #theme {
                .size(128px, 23px);
                //.bg(#f20);
                position: absolute;
                right: 10px;
                top: 10px;
                padding: 4px;
                box-sizing: border-box;

                ul {
                    width: 100%;
                    .clearFix();

                    li {
                        .size(15px, 15px);
                        .bg(url('../images/theme.gif') no-repeat 0 0);
                        .fl();
                        cursor: pointer;
                        margin-right: 3px;

                        &:nth-child(1) {
                            .bgp(0, -15px);
                        }

                        &:nth-child(2) {
                            .bgp(-99px, 0);
                        }

                        &:nth-child(3) {
                            .bgp(-79px, 0);
                        }

                        &:nth-child(4) {
                            .bgp(-59px, 0);
                        }

                        &:nth-child(5) {
                            .bgp(-39px, 0);
                        }

                        &:nth-child(6) {
                            .bgp(-19px, 0);
                        }
                    }
                }
            }

            /* nav ----- */

            #nav {
                .size(100%, 37px);
                .bg(#4A4A4A);
                position: absolute;
                bottom: 0;

                > ul {
                    width: 100%;
                    height: 37px;
                    margin-left: 22px;

                    > .nav-item {
                        .fl();
                        padding: 0 8px;
                        margin-left: 10px;
                        position: relative;

                        > a {
                            .color(#fff);
                            .fz(16px, 37px);
                            .fw();
                            display: block;
                        }

                        .sub-nav {
                            .size(474px, 170px);
                            .bg(#fff);
                            border: 1px solid #B1B1B1;
                            position: absolute;
                            top: 37px;
                            left: 0;
                            z-index: 999;
                            padding: 10px 12px;
                            box-sizing: border-box;

                            .sub-nav-top, .sub-nav-bottom {
                                .size(100%, 68px);

                                .title {
                                    .fl();
                                    .center(text-x);
                                    .fw();
                                    width: 82px;
                                    margin-top: 6px;
                                }

                                .content {
                                    width: 364px;
                                    .fl();

                                    a {
                                        .lh(26px);
                                        margin: 2px 0;
                                        padding: 2px;
                                    }
                                }
                            }

                            .sub-nav-top {
                                border-bottom: 1px dashed #ccc;
                            }

                            .sub-nav-bottom {
                                padding: 10px 0;
                            }
                        }
                    }
                }
            }
        }
    }
    /* header end */

    /* main start */
    #main {
        .clearFix();
        width: 990px;
        margin: 10px auto;

        /* categories */
        #categories {
            .size(187px, 560px);
            .fl();

            > .title {
                .size(100%, 30px);
                .bg(#6E6E6E);
                .fz(14px, 30px);
                .fw();
                .color(#fff);
                .border-box();
                padding-left: 14px;
            }
            > .content {
                .border-box();
                width: 100%;
                border: 1px solid #6E6E6E;
                border-top: none;
                padding: 5px 10px 0;
                .category-item {
                    .size(100%, 129px);
                    margin-bottom: 2px;
                    .title {
                        .fw();
                        .fz(12px);
                        .color(#000);
                        .border-1px(bottom, #efefef);
                        height: 25px;
                    }
                    ul {
                        .size(100%, 104px);
                        .clearFix();
                        li {
                            .size(50%, 24px);
                            .lh(24px);
                            .fl();
                            .border-box();
                            padding-left: 4px;
                            a {
                                .color(#444444);
                                .fz(12px);
                            }
                        }
                    }
                    &:nth-child(1) ul li:nth-child(2) a, &:nth-child(1) ul li:nth-child(7) a {
                        .color(#F9044E);
                        position: relative;
                    }
                    &:nth-child(1) ul li:nth-child(2) a::after, &:nth-child(1) ul li:nth-child(7) a::after {
                        content: "";
                        .size(21px, 16px);
                        position: absolute;
                        .bg(url('../images/hot.gif') no-repeat);
                        right: -22px;
                        top: -6px;
                    }
                }

            }
        }

        /* advertise */
        #ad {
            .size(790px, 560px);
            .fr();
            /* banner */
            #ad-t {
                .size(100%, 321px);
                .clearFix();
                #carousel {
                    .size(550px, 321px);
                    .fl();
                    position: relative;
                    ul {
                        position: relative;
                        li {
                            position: absolute;
                            top: 0;
                            left: 0;
                            display: none;
                            a {
                                display: block;
                                img {
                                    .size(100%, 100%);
                                }
                            }
                            &.active {
                                display: block;
                            }
                        }
                    }
                    ol {
                        .size(100%, 42px);
                        .clearFix();
                        position: absolute;
                        bottom: 0;
                        left: 0;
                        right: 0;
                        li {
                            .size(109px, 42px);
                            .bg(pink);
                            .fl();
                            .border-box();
                            .lh(18px);
                            .color(#fff);
                            .bg(#444444);
                            opacity: 0.7;
                            padding: 5px 15px;
                            text-align: center;
                            cursor: pointer;
                            span {
                                display: block;
                            }
                            &:nth-child(-n+4) {
                                .border-box();
                                margin-right: 1px;
                            }
                            &:nth-child(5) {
                                width: 110px;
                            }
                            &.active {
                                opacity: 1;
                                .bg(url("../images/adindex.gif") no-repeat center 38px #37A7D7);
                            }
                        }
                    }
                }
                #newDynamic {
                    .size(230px, 321px);
                    .fr();
                    .ad {
                        .size(100%, 176px);
                        overflow: hidden;
                        .pic {
                            display: block;
                            img {
                                .size(100%, 100%);
                                display: block;
                                //transition: transform .6s ease-in-out;
                                //&:hover {
                                //    transform: rotate(720deg);
                                //}
                            }
                        }
                    }
                    .content {
                        .size(100%, 135px);
                        margin-top: 10px;
                        border: 1px solid #DFDFDF;
                        .border-box();
                        .title {
                            height: 24px;
                            .lh(24px);
                            .fz(12px);
                            .fw();
                            padding-left: 12px;
                            .border-box();
                            border-bottom: 1px solid #DFDFDF;
                        }
                        ul {
                            padding: 3px 30px 0 10px;
                            .border-box();
                            li {
                                height: 20px;
                                .lh(20px);
                                a {
                                    .color(#666666);
                                    .fz(12px);
                                    padding: 2px 0;
                                    &:hover {
                                        .color(#008CBC);
                                        text-decoration: none;
                                    }
                                }
                            }
                        }
                        #title {
                            position: absolute;
                            border: 1px solid #333;
                            .bg(#F7F5D1);
                            .color(#333);
                            .fz(12px);
                            padding: 1px;
                            display: none;
                        }
                    }
                }
            }
            /* brandActivity */
            #activity {
                .size(100%, 230px);
                margin-top: 10px;
                .activity-t {
                    height: 30px;
                    border-bottom: 1px solid #E4E4E4;
                    position: relative;
                    .title {
                        .fz(12px, 30px);
                        .fw();
                        .color(#000);
                    }
                    .nav {
                        .size(216px, 22px);
                        position: absolute;
                        right: 0;
                        bottom: 0;
                        .clearFix();
                        li {
                            .size(44px, 22px);
                            margin-right: 10px;
                            .fl();
                            a {
                                display: block;
                                padding: 4px 10px;
                            }
                            &.active {
                                .bg(url('../images/chos.gif') no-repeat scroll 50% 21px);
                                padding-bottom: 3px;
                                a {
                                    .bg(#FA5889);
                                    .color(#fff);
                                }
                            }
                        }
                    }
                }
                .content {
                    .size(780px, 200px);
                    padding: 8px 0 0 5px;
                    .border-box();
                    overflow: hidden;
                    position: relative;
                    ul {
                        .size(3160px, 188px);
                        position: absolute;
                        li {
                            .size(195px, 188px);
                            padding: 0 5px;
                            position: relative;
                            .border-box();
                            .fl();
                            > a {
                                .size(185px, 164px);
                                display: block;
                                .pic {
                                    .size(185px, 164px);
                                    display: block;
                                }
                            }
                            .txt {
                                .size(185px, 24px);
                                display: block;
                                .bg(#EFEFEF);
                                .center(text-x);
                                .lh(24px);
                                position: absolute;
                                bottom: 0;
                                a {
                                    .color(#666666);
                                    &:hover {
                                        .color(#008CBC);
                                        text-decoration: none;
                                    }
                                }
                            }
                            .mask {
                                .size(185px, 164px);
                                position: absolute;
                                top: 0;
                                left: 5px;
                                z-index: 112;
                                cursor: pointer;
                                &.showMask {
                                    .bg(url('../images/zoom.gif') no-repeat center center rgba(255, 255, 255, .4));
                                    .bgc(rgba(255, 255, 255, .6));
                                    opacity: .6;
                                }
                            }
                        }
                    }
                }
            }
        }

        /* product */
        #product-info {
            .size(790px, 560px);
            .fr();
            /* preview-wrap */
            #preview-wrap {
                .size(310px, 560px);
                .fl();
                // preview
                .preview {
                    .size(310px, 310px);
                    border: 1px solid #BBBBBB;
                    .border-box();
                    img {
                        .size(100%, 100%);
                    }
                }

                // look-pic
                .look-pic {
                    .size(100%, 21px);
                    padding: 10px 0;
                    text-align: center;
                }

                // spec-list
                .spec-list {
                    .size(100%, 80px);
                    ul {
                        height: 64px;
                        .clearFix();
                        li {
                            .size(62px, 62px);
                            .fl();
                            border: 1px solid #EEE;
                            margin-right: 10px;
                            a {
                                .size(100%, 100%);
                                display: block;
                                img {
                                    .size(100%, 100%);
                                }
                            }
                            &:hover {
                                box-shadow: 0 0 0 1px #888;
                            }
                        }
                    }
                }

                // intro-tab
                .intro-tab {
                    .size(100%, 110px);
                    .tab-head {
                        height: 20px;
                        .clearFix();
                        .nav-item {
                            .size(82px, 20px);
                            .fl();
                            .fz(12px, 20px);
                            .bg(#F1F1F1);
                            .center(text-x);
                            .border-box();
                            margin-right: 6px;
                            cursor: pointer;
                            border: 1px solid #898989;
                            border-bottom: none;
                            &.active {
                                .bg(#6D84B4);
                                .color(#FFF);
                            }
                        }
                    }
                    .tab-content {
                        .size(100%, 88px);
                        .border-box();
                        position: relative;
                        .content-item {
                            .lh(18px);
                            border: 1px solid #898989;
                            position: absolute;
                            top: 0;
                            left: 0;
                            display: none;
                            &.active {
                                display: block;
                            }
                        }
                    }
                }
            }
            #pro-detail {
                .size(448px, 560px);
                .fl();
                .fz(12px);
                margin-left: 10px;

                .title {
                    .lh(17px);
                    .fw();
                }
                .pro-intro {
                    .lh(25px);
                }
                .price-w {
                    .lh(24px);
                     .price {
                         .fz(14);
                         text-decoration: line-through;
                    }
                }
                .discount {
                    .lh(28px);
                    .new-price {
                        .fz(24px);
                        .fw();
                        .color(#FF5500);
                        vertical-align: bottom;
                    }
                }
                .color {
                    height: 66px;
                    margin-top: 4px;
                    .color-list {
                        height: 34px;
                        margin-top: 4px;
                        .clearFix();

                        .color-item {
                            .size(34px, 34px);
                            .fl();
                            margin-right: 10px;
                            cursor: pointer;
                            img {
                                border: 1px solid #BBB;
                                .size(30px, 30px);
                                &.active {
                                    border: 1px solid #f60;
                                }
                                &:hover {
                                    border: 1px solid #f60;
                                }
                            }
                        }
                    }
                }
                .size {
                    height: 56px;
                    .size-list {
                        height: 34px;
                        margin-top: 4px;
                        .clearFix();
                        .size-item {
                            .size(32px, 32px);
                            .fl();
                            .fz(14px, 32px);
                            .center(text-x);
                            margin-right: 6px;
                            border: 1px solid #AAA;
                            cursor: pointer;
                            &.active {
                                .bg(#f60);
                            }
                        }
                    }
                }
                .count {
                    height: 42px;
                    position: relative;
                    margin-top: 4px;
                    .count-sel {
                        select {
                            .size(40px, 18px);
                            .border-box();
                            padding-left: 8px;
                            display: block;
                            margin-top: 4px;
                        }
                        &::after {
                            content: "";
                            width: 0;
                            height: 0;
                            border: 4px solid;
                            border-color: #000 transparent transparent transparent;
                            position: absolute;
                            top: 25px;
                            left: 24px;
                        }
                    }
                }
                .total {
                    .lh(20px);
                }
                .ratings {
                    margin-top: 4px;
                    .star-list {
                        height: 20px;
                        .clearFix();
                        margin-top: 4px;
                        .star-item {
                            .size(16px, 16px);
                            .fl();
                            .bg(url('../images/star-matrix.gif') no-repeat 0 0);
                            cursor: pointer;
                        }
                    }
                }
                .shop-cart {
                    .size(94px, 29px);
                    margin-top: 20px;
                    a {
                        display: block;
                        img {
                            .size(100%, 100%);
                        }
                    }
                }
            }
        }
    }
    /* main end */

    /* footer start */
    #footer {
        .size(990px, 50px);
        .lh(50px);
        .fz(14px);
        .center(auto-x);
        .center(text-x);
        .color(#666666);
    }
    /* footer end */

}

/* modal-mask */
#modal-mask {
    .absolute();
    .bg(rgba(0, 0, 0, .7));
    display: none;

    .inner {
        .size(574px, 603px);
        .bg(#fff);
        .border-box();
        .center(auto);
        padding: 15px 0 0 15px;
        .big-pic {
            .size(538px, 538px);
            border: 1px solid #666;
            img {
                .size(100%, 100%);
            }
        }

        .pic-intro {
            .size(538px, 40px);
            .lh(40px);
            .txt {
                .fl();
            }
            .tip{
                .fr();
            }
        }
    }
}

#modal-mask-cart {
    .absolute();
    .bg(rgba(0, 0, 0, .5));
    //display: none;

    .inner {
        .size(518px, 208px);
        .center(auto);
        border: 10px solid rgba(0, 0, 0, .6);
        .bg(#fff);
        position: relative;
        .tip {
            .size(100%, 24px);
            .bg(#EBF2FA);
            .clearFix();
            h3 {
                .fz(12px, 24px);
                .fl();
                margin-left: 15px;
            }
            .close {
                .size(18px, 18px);
                .fr();
                .bg(url('../images/box.png') no-repeat -248px 0);
                cursor: pointer;
                margin-right: 5px;
                margin-top: 2px;
                &.active {
                    .bgp(-267px, 0);
                }
            }
        }

        .ok {
            display: block;
            .size(32px, 32px);
            .bg(url('../images/box.png') no-repeat -66px 0);
            position: absolute;
            top: 49px;
            left: 25px;
        }
        .buy-info {
            .size(402px, 64px);
            position: absolute;
            top: 60px;
            left: 70px;
            h3 {
                .fz(16px);
                .fw();
            }
            p {
                .fz(12px, 18px);
            }
        }
        > .close {
            .size(68px, 24px);
            position: absolute;
            bottom: 10px;
            right: 10px;
            border-radius: 4px;
            box-shadow: 0 0 0 1px #666;
            &.active {
                .bg(#eee);
            }
        }
    }

}
